<?php
echo $header;
echo $sidebar
?>		
<div class="span10 content">
    <?php echo $hugemenu ?>

    <h1><?php echo lang('page_edit_title'); ?></h1>
    <?php if ($message) { ?>
        <div class="alert alert-error">
            <a class="close" data-dismiss="alert" href="#">x</a><?php echo $message; ?>
        </div>
    <?php } if ($success) { ?>
        <div class="alert alert-success">
            <a class="close" data-dismiss="alert" href="#">x</a><?php echo $success; ?>
        </div>
    <?php } ?>

    <script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/tiny_mce/jquery.tinymce.js"></script>
    <script type="text/javascript">
        $().ready(function() {
            $('textarea.tinymce').tinymce({
                script_url: '<?php echo base_url() ?>assets/admin/js/tiny_mce/tiny_mce.js',
                theme: "advanced",
                plugins: "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",
                theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist",
                theme_advanced_buttons2: "styleselect,formatselect,fontselect,fontsizeselect,|,print,charmap,emotions,iespell,media,advhr",
                theme_advanced_buttons3: "undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor,|,outdent,indent,blockquote",
                theme_advanced_buttons4: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup",
                theme_advanced_toolbar_location: "top",
                theme_advanced_toolbar_align: "left",
                theme_advanced_statusbar_location: "bottom",
                theme_advanced_resizing: true,
                height: "400"
            });
        });
    </script>

    <?php echo form_open_multipart(current_url()); ?>
    <div class="widget">
        <div class="widget-head"><h3 class="heading"><?php echo lang('blog_edit_widget_title') . $title['value'] ?></h3></div>
        <div class="widget-body">
            <div class="row-fluid">
                <div class="span8">	
                    <div class="control-group">
                        <label class="control-label"><?php echo lang('estate_add_title', 'title'); ?></label>
                        <div class="controls">
                            <?php
                            $title['class'] = 'span';
                            echo form_input($title);
                            ?>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"><?php echo lang('estate_add_content', 'content'); ?></label>
                        <div class="controls">
                            <?php
                            $content['class'] = 'span tinymce';
                            $content['style'] = "width:100%";
                            echo form_textarea($content);
                            ?>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label"></label>
                        <div class="controls">
                            <?php echo form_submit('submit', lang('page_edit_btn'), 'class="btn btn-success span5"'); ?>
                        </div>
                    </div>
                </div>

                <div class="span4">
                    <div class="well well-small">
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('blog_add_desc', 'desc'); ?></label>
                            <div class="controls">
                                <?php
                                $desc['class'] = 'span';
                                echo form_input($desc);
                                ?>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><?php echo lang('blog_add_tags', 'tags'); ?></label>
                            <div class="controls">
                                <?php
                                $tags['class'] = 'span';
                                echo form_input($tags);
                                ?>
                            </div>
                        </div>
                    </div>

                    <div class="well well-small">
                        <div class="control-group">
                            <h3 class="control-label"><?php echo lang('blog_add_publish'); ?></h3>
                            <div class="controls emlakoptions">
                                <label><?php
                                    echo form_radio($publish);
                                    echo lang('estate_add_publish')
                                    ?></label>
                                <label><?php
                                    echo form_radio($publish2);
                                    echo lang('estate_add_draft')
                                    ?></label>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

<?php echo form_close(); ?>	

</div>
<!--/content-->

<?php echo $footer ?>